home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / stronged / !StrongED_Modes_!HTML_Modefile < prev    next >
Encoding:
Text File  |  1996-08-07  |  4.9 KB  |  213 lines

  1.  
  2. # HTML mode for strong ed
  3. # Written by Andrew Black  andrew@bach.demon.co.uk
  4. # Contact me with comments, gribes, praise , suggestions .......
  5. #
  6. # $Header: RCS.html 4.0 96/05/11 11:53:42 root Exp $
  7.  
  8. #----------------------------------------------------------------------
  9.  
  10. SyntaxOptions
  11.     SingleQuote    No
  12.     DoubleQuote    Yes
  13.     QuoteQuote    Yes
  14.     SplitString    No
  15. End
  16. SyntaxComment 
  17.     Type        Multiline
  18.     StartWith    <!--
  19.     EndWith        -->
  20. End 
  21.  
  22. # Id's are used to try and pick up all tags that  don't have their
  23. # own colouring.   It also picks out start of tags such as
  24. # <A ( as part of <A HREF=""></A> )
  25. # Of course it will also pick out non-tags such as <ANDREW>
  26.  
  27. ID_FirstChar    <
  28. ID_Middle    /A-Za-z_0-9
  29. ID_LastChar    A-Za-z_0-9>
  30.  
  31. SyntaxWords Group1 EndAlways nocase
  32.  
  33.     <address> <html> <head> <title> <body>
  34.     </address> </html> </head> </title> </body>
  35. #     this covers <BODY BACKGROUND ...
  36.     <body
  37.     <h1> <h2> <h3> </h1> </h2> </h3>
  38.  
  39. End
  40.  
  41. SyntaxWords Group2 EndAlways nocase
  42.     <ul> </ul>  <dl> </dl> <ol> </ol>
  43.     <form> </form>
  44.     <table> </table>
  45. End
  46.  
  47. SyntaxWords Group3 EndAlways nocase
  48.     <li> <dt> <dd>
  49.     <input
  50. End
  51.  
  52. # recommended colour - blue (to look like an anchor in browers)
  53. SyntaxWords Group4 EndAlways nocase
  54.     <img
  55.     <a   </a>
  56. End
  57.  
  58. #----------------------------------------------------------------------
  59.  
  60.  
  61. Search
  62.     heading1    "<h"  AlphaNum   ">" @0 *  "</" @9
  63.     heading        "<h"  AlphaNum   ">" @0 * @9 "</"
  64.     tag        "<" ["\\"] { AlphaNum | "/" }+  ">"
  65.     _MarkWord    tag  | {AlphaNum}+   | {Punct}+
  66.  
  67.     quote        "\""
  68.     anchor        "<a" {iswhite}+ * "href" {iswhite} "="  {iswhite}  quote @0 ** quote  ">" @9
  69.     anchor1        "<a" {iswhite}+ * "href" {iswhite} "="  {iswhite}  quote @0
  70.     selected_line    {any}+
  71.  
  72. # match everything sensible but not , 
  73. #    textstr     { AlphaNum | '\' _\-' }+
  74.  
  75.     url        {AlphaNum}+ ":/" { ["~"] alphanum | '/_.' }+
  76.     url_text    @1 url @2 {iswhite} @3 {.} @4
  77.     text        @1 @2 @3 {.} @4
  78. #        hotlist    url_text  |  text
  79.     hotlist        url_text
  80. # removing tag
  81.     anch_st        "<a" {iswhite}+ * quote
  82.     anch_end    quote  {iswhite} ">"
  83.     remove_tag    anch_st | anch_end | tag
  84.  
  85. End
  86.  
  87. Replace
  88.     h1        "<H1>" @@ "</H1>"
  89.     h2        "<H2>" @@ "</H2>"
  90.     h3        "<H3>" @@  "</H3>"
  91. #misc
  92.     ital        "<I>" @@ "</I>"
  93.     bold        "<B>" @@ "</B>"
  94.     strong        "<STRONG>" @@ "</STRONG>"
  95.     emphasis    "<EM>" @@  "</EM>"
  96.  
  97.     hotlist_r  "<A href=\"" @12  "\">" @34  "</A>" nl
  98. #    anch     "<A href=\"" @@  "\"> </A>"
  99. End
  100.  
  101. Functions
  102.  
  103.     Icon    lof
  104.     Select     ListOfFound (heading1,All,Align,noLine,NoCase)
  105.     Menu    List of headings
  106.     Help    Select - list of headings|MAdjust - list of Anchors
  107.  
  108.     Adjust    ListOfFound (anchor,All,align,noLine,NoCase)
  109.  
  110.     Key    ⇧F3
  111.     Menu    Save & Render      ⇧F3
  112.     Icon    run
  113.     Select    SetTmp() SaveDClick ("<tmp$path>.<tmp$leaf>")
  114.     Help    Click to save text and launch viewer (⇧F3)
  115.  
  116.     Menu    Escape brackets
  117.     Key    ⇧^F4
  118.     Select    Replace ("<","<", block ) Replace (">",">", block )
  119.     Help    replaces  < with escape |M to embed an HTML example in HTML file
  120.  
  121.     Menu    Load selected file
  122.     Help    Click to load the HTML file under cursor.
  123.     Select    SetTmp() LoadOne ("<tmp$path>.<tmp$word>","<tmp$word>")
  124.     Help    Goes to selected file|MFor now must be in same directory as current file
  125.  
  126. #    Key
  127.     Menu    Create <H1>
  128.     Icon    ab_h1
  129.     Select    Replace( selected_line,h1 , block , noline,nocase)
  130.     Help    Makes selected text into H1
  131.  
  132.     Menu    Create <H2>
  133.     Icon    ab_h2
  134.     Select    Replace( selected_line,h2 , block , noline,nocase)
  135.     Help    Makes selected text into H2
  136.     
  137.     Menu    Create <H3>
  138.     Icon    ab_h3
  139.     Select    Replace( selected_line,h3 , block , noline,nocase)
  140.     Help    Makes selected text into H3
  141.  
  142. #     !stronged sounds like a good icon for this.  hope Guttorm doesn't mind :-)
  143.     Menu    Add strong
  144.     Icon    sm!stronged
  145.     Select    Replace( selected_line,strong , block , noline,nocase)
  146.     Help    Makes selected text strong
  147.  
  148.     Menu    Add emphasis
  149.     Icon    ab_emph
  150.     Select    Replace( selected_line,emphasis , block , noline,nocase)
  151.     Help    Makes selected text emphasis
  152.  
  153.     Menu    Add italic
  154.     Icon    ab_italic
  155.     Select    Replace( selected_line,ital , block , noline,nocase)
  156.     Help    Makes selected text italic
  157.  
  158.     Menu    Add bold
  159.     Icon    ab_bold
  160.     Select    Replace( selected_line,bold , block , noline,nocase)
  161.     Help    Makes selected text bold
  162.  
  163.     Menu    Remove tags
  164.     Select    Replace( remove_tag,"" , block , noline,nocase)
  165.     Help    Removes all tags from selected text |M (URL of anchors remain)
  166.  
  167. #        Menu    Insert Anchor
  168.     Icon    ab_anchor
  169.       Select    InsertStr("<A href=\"\"> </A>")
  170.       Help        Select inserts anchor|M Adjust Convert url + text to anchor
  171.  
  172.       Key f9
  173.       Adjust    Replace (hotlist,hotlist_r, block )
  174.  
  175.  
  176. End
  177.  
  178.  
  179. Shortcuts
  180. # overall HTML file (to create a new file)
  181. # add your name etc into here
  182.     ''f    <HTML>\N<HEAD>\N  <TITLE>\@</TITLE>\N</HEAD>\N\N<BODY>\N<H1>\@</H1>\N<HR>\N<ADDRESS>My name </ADDRESS>\N</BODY></HTML>
  183. #lists
  184.     ''ul    <UL>\N\I  <LI>\@\N\I</UL>
  185.     ''ol    <OL>\N\I  <LI>\@\N\I</OL>
  186.     <LI>+    <LI>\@\N\I<LI>
  187.  
  188. #anchors
  189.     ''ai    <A href="\@">\@</A>
  190.     ''ae    <A href="http://\@/\@">\@</A>
  191.     ''ha    <H1><a name="\@">\@</a></H1>
  192. # heads
  193.     ''1    <H1>\@</H1>\N
  194.     ''2    <H2>\@</H2>\N
  195.     ''3    <H3>\@</H3>\N
  196. #misc
  197.     ''i    <I>\@</I>
  198.     ''b    <B>\@</B>
  199.     ''m    <IMG SRC="\@" ALT="[\@]">
  200. #  comment :
  201.     ''!    <!-- \@ -->
  202.  
  203. End
  204.  
  205. Shortcuts
  206.     å    å
  207.     Å    &ARING
  208.     ø    ø
  209.     Ø    &OSLASH
  210.     æ    ¸la
  211.     Æ    &CEDILLA
  212. End  
  213.